/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hu.sqlexpr;

/**
 *
 * @author trekan
 */
public class Select implements Statement {
    
    protected String select;
    protected String from;
    protected Condition startWith;
    protected Condition connectBy;
    protected Condition where;
    protected String orderBy;
    protected Paging paging;

    
    //TODO private constructor
    protected Select(String select) {
        this.select = select;
    }
    
    public Select from(String from) {
        this.from = from;
        return this;
    }
    
    public Select where(Condition where) {
        this.where = where;
        return this;
    }
    
    public Select orderBy(String orderBy) {
        this.orderBy = orderBy;
        return this;
    }
    
    public Select startWith(Condition startWith) {
        this.startWith = startWith;
        return this;
    }

    public Select connectBy(Condition connectBy) {
        this.connectBy = connectBy;
        return this;
    }

    public Select paging(Paging paging) {
        this.paging = paging;
        return this;
    }
    
    public void accept(Visitor visitor) throws SyntaxException {
        visitor.visit(this);
    }    
}
